/*
 * XMLHandler.java
 *
 * Created on 21 novembre 2007, 11:00
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.ifips5.nal.epizza.util;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

/**
 *
 * @author Moi
 */
abstract class XMLHandler<T>
{
    private static JAXBContext	oJAXBContext	= null;

    protected static JAXBContext getJAXBContext()
    {
        if (oJAXBContext != null)
        {
            return oJAXBContext;
        }
        try
        {
            oJAXBContext = JAXBContext.newInstance(ObjectFactory.class.getPackage().getName());
        } catch (JAXBException e)
        {
                e.printStackTrace();
        }
        return oJAXBContext;
    }

    public abstract void fillObject(T t);

    public abstract void readObject(T t);    
}
